package com.admin.socketmultiplayer.dialog

import android.app.Dialog
import android.content.Context
import android.view.LayoutInflater
import com.admin.socketmultiplayer.R

/**
 * Created by 吴昶 on 2018/4/25.
 */
abstract class BaseDialog(context: Context,layout:Int,theme:Int):Dialog(context,theme){
    open var fview= LayoutInflater.from(context).inflate(layout,null)
    init {
        initView()
        initData()
    }

    private fun initView(){
        this.requestWindowFeature(android.view.Window.FEATURE_NO_TITLE)
        this.setContentView(fview)
        this.setCanceledOnTouchOutside(true)
        this.show()
    }

    abstract fun initData()
}